package cn.xiaoniu.day05.util;

import org.apache.commons.dbutils.QueryRunner;

import com.mchange.v2.c3p0.ComboPooledDataSource;
/**
 * db工具类
 * @author root
 *
 */
public class DBUtil {
	static ComboPooledDataSource pool = new ComboPooledDataSource();//只需要创建一次
	
	/**
	 * 得到执行sql的对象
	 * @return
	 */
	public static QueryRunner getRunner(){
		QueryRunner runner = new QueryRunner(pool);
		return runner;
	}

}
